package com.yunsom.testdemo.design.watcher;

/**
 * @author Xbao
 * @version 1.0
 * @description
 * @date 2021/3/22 20:05
 */
public class BinaryAbstractObserver extends AbstractObserver {

  public BinaryAbstractObserver(Subject subject){
    this.subject = subject;
    this.subject.attach(this);
  }

  @Override
  public void update() {
    System.out.println("binary string:"+Integer.toBinaryString(subject.getState()));
  }
}
